<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>Document</title>
		<link rel="stylesheet" href="../layui/css/layui.css">
		<link rel="stylesheet" type="text/css" href="../css/guide.css">
	</head>
	<style type="text/css">
			.report {
    position: absolute;
    right: 10px;
    top: 0;
}
.xs{
	position: relative;
	    border: 1px solid gainsboro;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.1);
}
	</style>
	<body>
		<div class="select">
			<div>
				<div class="center select-t">
					<p>筛选</p>
					<span class="close">X</span>
				</div>
				<div class="select-b">
					<p>想看到的用户</p>
					<div class="sex">
						<div class="blue all">全部</div>
						<div class="s-girl" data-sex="女"><img src="../img/female-n.png">女</div>
						<div class="s-boy" data-sex="男"><img src="../img/male-n.png">男</div>
					</div>
					<div class="sure center" style="opacity: 0">确定</div>
				</div>
			</div>
		</div>
		<header>
			<a href="javascript:history.back(-1)" class="back"><img src="../img/back.png" height="18px"></a>
			<div class="center title">同城导游</div>
		</header>
		<div class="title">性别筛选 <img src="../img/filtration.png" height="15px" class="filtrate"></div>
		<main>
			
			<!-- <a href="guide-d.html" class="n-underline">
				<div class="xs">
					<div class="flex">
						<div class="head">
							<img src="../img/logo.png" width="50px">
						</div>
						<div class="head-r">
							<div class="flex">
								<div class="flex">小野
									<p class="girl flex">
										<img src="../img/female-s.png" height="7px"> 23
									</p>
								</div>
							</div>
							<p>江浙沪旅游，美食美景自由行，一站式私人定制</p>
							<img src="../img/star-f.png" height="8px">
							<img src="../img/star-f.png" height="8px">
							<img src="../img/star-f.png" height="8px">
							<img src="../img/star-f.png" height="8px">
							<img src="../img/star-f.png" height="8px">
							<span>5.0分</span>
						</div>
					</div>
				</div>
			</a>
			<div class="xs">
				<div class="flex">
					<div class="head">
						<img src="../img/logo.png" width="50px">
					</div>
					<div class="head-r">
						<div class="flex">
							<div class="flex">小野
								<p class="girl flex">
									<img src="../img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p>江浙沪旅游，美食美景自由行，一站式私人定制</p>
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<span>5.0分</span>
					</div>
				</div>
			</div>
			<div class="xs">
				<div class="flex">
					<div class="head">
						<img src="../img/logo.png" width="50px">
					</div>
					<div class="head-r">
						<div class="flex">
							<div class="flex">小野
								<p class="girl flex">
									<img src="../img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p>江浙沪旅游，美食美景自由行，一站式私人定制</p>
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<span>5.0分</span>
					</div>
				</div>
			</div>
			<div class="xs">
				<div class="flex">
					<div class="head">
						<img src="../img/logo.png" width="50px">
					</div>
					<div class="head-r">
						<div class="flex">
							<div class="flex">小野
								<p class="girl flex">
									<img src="../img/female-s.png" height="7px"> 23
								</p>
							</div>
						</div>
						<p>江浙沪旅游，美食美景自由行，一站式私人定制</p>
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<img src="../img/star-f.png" height="8px">
						<span>5.0分</span>
					</div>
				</div>
			</div> -->
		</main>

		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../layui/layui.js"></script>
		<script src="../js/party.js"></script>
	</body>
</html>	
<script type="text/javascript">
	$.ajax({
			type:"post",
			url:"/meiyou/selAllGuide",
			success:function  (data) {
				console.log(data);
					$.each(data,function(i,val){
						if (val.u_sex=="男") {
							$('main').append("<a href='guide-d.html?id="+val.g_id+"' class=\"n-underline\">\n" +
								"<div class=\"xs\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"head\">\n" +
								"<img src='"+val.u_img+"' width=\"50px\">" +
								"</div>\n" +
								"<div class=\"head-r\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"flex\">"+val.g_u_count+
								"<p class=\"boy flex\">\n" +
								"<img src=\"../img/male-s.png\" height=\"7px\">"+ val.u_old+
								"</p>\n" +
								"</div>\n" +
								"</div>\n" +
								"<p>"+val.g_duce+"</p>\n" +
								"<p class='score' id='"+val.g_id+"'>"+"</p>"+
								"</div>\n" +
								"</div>\n" +
								"<a href='../html/report.html?id="+val.g_u_count+"&type=data'><img src=\"../img/report.png\" height=\"15px\" class=\"report\"></a>" +
								"</div>\n" +
								"</a>")
						}else{
							$('main').append("<a href='guide-d.html?id="+val.g_id+"' class=\"n-underline\">\n" +
								"<div class=\"xs\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"head\">\n" +
								"<img src='"+val.u_img+"' width=\"50px\">" +
								"</div>\n" +
								"<div class=\"head-r\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"flex\">"+val.g_u_count+
								"<p class=\"girl flex\">\n" +
								"<img src=\"../img/female-s.png\" height=\"7px\">"+ val.u_old+
								"</p>\n" +
								"</div>\n" +
								"</div>\n" +
								"<p>"+val.g_duce+"</p>\n" +
								"<p class='score' id='"+val.g_id+"'>"+"</p>"+
								"</div>\n" +
								"</div>\n" +
								"<a href='../html/report.html?id="+val.g_u_count+"&type=data'><img src=\"../img/report.png\" height=\"15px\" class=\"report\"></a>" +
								"</div>\n" +
								"</a>")
						}
					var score=val.g_assess;
					layui.use(['rate'], function(){
					var rate = layui.rate;
					rate.render({
						elem: "#"+val.g_id,
						value: score,
						half: false,
						text: true,
						readonly: true,
						setText: function(value){
							this.span.text(value+'分');
						}
					});

				});
				});
			}
		});
	$('.sex div:nth-child(1)').click(function(){
	window.location.reload();
});
$('.sex div').click(function(){
	var sex=$(this).attr('data-sex');
	console.log(sex);
	$.post('/meiyou/selAllGuideTerm',{uSex:sex},function(data){
		console.log(data);
		$('main').html('');
		$('.select').hide();
			$.each(data,function(i,val){
						if(val.t_sex=="男"){
							$('main').append("<a href='guide-d.html?id="+val.g_id+"' class=\"n-underline\">\n" +
								"<div class=\"xs\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"head\">\n" +
								"<img src='"+val.u_img+"' width=\"50px\">" +
								"</div>\n" +
								"<div class=\"head-r\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"flex\">"+val.g_u_count+
								"<p class=\"boy flex\">\n" +
								"<img src=\"../img/male-s.png\" height=\"7px\">"+ val.u_old+
								"</p>\n" +
								"</div>\n" +
								"</div>\n" +
								"<p>"+val.g_duce+"</p>\n" +
								"<p class='score' id='"+val.g_id+"'>"+"</p>"+
								"</div>\n" +
								"</div>\n" +
								"<a href='../html/report.html?id="+val.g_u_count+"&type=data'><img src=\"../img/report.png\" height=\"15px\" class=\"report\"></a>" +
								"</div>\n" +
								"</a>")
						
						}else{
							$('main').append("<a href='guide-d.html?id="+val.g_id+"' class=\"n-underline\">\n" +
								"<div class=\"xs\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"head\">\n" +
								"<img src='"+val.u_img+"' width=\"50px\">" +
								"</div>\n" +
								"<div class=\"head-r\">\n" +
								"<div class=\"flex\">\n" +
								"<div class=\"flex\">"+val.g_u_count+
								"<p class=\"girl flex\">\n" +
								"<img src=\"../img/female-s.png\" height=\"7px\">"+ val.u_old+
								"</p>\n" +
								"</div>\n" +
								"</div>\n" +
								"<p>"+val.g_duce+"</p>\n" +
								"<p class='score' id='"+val.g_id+"'>"+"</p>"+
								"</div>\n" +
								"</div>\n" +
								"<a href='../html/report.html?id="+val.g_u_count+"&type=data'><img src=\"../img/report.png\" height=\"15px\" class=\"report\"></a>" +
								"</div>\n" +
								"</a>")
						
						}
					var score=val.g_assess;
					layui.use(['rate'], function(){
					var rate = layui.rate;
					rate.render({
						elem: "#"+val.g_id,
						value: score,
						half: false,
						text: true,
						readonly: true,
						setText: function(value){
							this.span.text(value+'分');
						}
					});

				});
						});
		


	});


});
</script>